package com.idas.comp.enums;

public enum ResourceType {
	NONE, USER, MODULE, EXPENSE;
	
	public static ResourceType getValue(int type) {
		switch (type){
		case 1:
			return USER;
		case 2:
			return MODULE;
		case 3:
			return EXPENSE;
		}
		return NONE;
	}
	
	public static int getValue(ResourceType type){
		switch(type){
		case USER:
			return 1;
		case MODULE:
			return 2;
		case EXPENSE:
			return 3;
		}
		return 0;
	}
	
	public static int getValue(String value) {
		return getValue(ResourceType.valueOf(value.toUpperCase()));

	}
}
